package com.celesea.framework.dao;

import com.celesea.framework.entity.BaseEntity;
import com.celesea.framework.util.Sort;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.condition.SelectByConditionMapper;
import tk.mybatis.mapper.common.condition.UpdateByConditionMapper;
import tk.mybatis.mapper.common.example.DeleteByExampleMapper;
import tk.mybatis.mapper.common.example.SelectByExampleMapper;
import tk.mybatis.mapper.common.example.UpdateByExampleMapper;
import tk.mybatis.mapper.common.ids.DeleteByIdsMapper;
import tk.mybatis.mapper.common.ids.SelectByIdsMapper;
import tk.mybatis.mapper.common.rowbounds.SelectByConditionRowBoundsMapper;

public interface BaseDao<T extends BaseEntity> extends
//        MySqlMapper,
        MyInsertListMapper<T>,
        Mapper<T>,
        DeleteByIdsMapper<T>,
        SelectByIdsMapper<T>,


        UpdateByExampleMapper<T>,
        DeleteByExampleMapper<T>,
        SelectByExampleMapper<T>,

        UpdateByConditionMapper<T>,
        SelectByConditionMapper<T>,
        SelectByConditionRowBoundsMapper<T> {


    Page<T> selectPage(
            @Param("filter") Filter filter,
            @Param("page") com.celesea.framework.util.Page page,
            @Param("sort") Sort sort);
}